{% load get_latest %}

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html lang="en">

	<head>
		<title>My Site - {%block pagetitle %}{% endblock %}</title>
		<link rel="stylesheet" href="/media/base.css" type="text/css"/>

	</head>
	<body>
		<div id='container'>
			<div id="header">My Site</div>
			<div id="nav">
				<ul>
					<li><a href="/">Home</a></li>
					<li><a href="/blog/">Blog</a></li>
					<li><a href="/links/">Links</a></li>
					<li><a href="/about/">About</a></li>
				</ul>			
			</div>
			<div id="content">
				<div id="primary">
					<h1>{% block title %}{% endblock %}</h1>
					{% block primary %}{% endblock %}
				</div>
				{% block secondary %}
				<div id="secondary">
					<h3>Recent Entries:</h3>
					{% get_latest blog.Entry 5 as recent_posts %}
				    <ul class="archive">
				    	{% for obj in recent_posts %}
						<li>
							<a href="{{ obj.get_absolute_url }}" title="Permanent Link to {{ obj.title}}">{{ obj.title}}</a>
						</li>
				    	{% endfor %}
					</ul>
				</div>
				<div id="links">
					<h3>Recent Delicious Links</h3>
					{% get_latest links.Link 5 as recent_links %}
					
					<ul class="archive">
						{% for obj in recent_links %}
						<li>
							<a href="{{ obj.url }}" title="{{ obj.title}}">{{ obj.title}}</a>{{obj.description}} Posted on {{obj.pub_date|date:"D d M Y"}}
						</li>
						{% endfor %}
					</ul>
				</div>
				{% endblock %}
			</div>
		</div>
	</body>
</html>

